package com.example.batterynotification;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.sax.StartElementListener;
import android.util.Log;

public class OnBoot extends BroadcastReceiver {
	@Override
	public void onReceive(Context context, Intent intent) {
		Log.i("LC", "on recieve");
		AppContext appContext = new AppContext(context);
		new Preferences(appContext);
	
		if((Preferences.getBoolPreferences("HighSwitch"))||(Preferences.getBoolPreferences("LowSwitch")))
		{
			Log.i("LC", "in the condition");
	        Intent serviceIntent = new Intent(context,ListeningService.class);
	        context.startService(serviceIntent);
	        Log.i("LC", "after restart");
		}
		
	}

}
